﻿using GoodroommateComputingPlatform.Tasks.Goodroommate;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace GoodroommateComputingPlatform.Tasks
{
    public static class TaskLoaderExtensions
    {
        public static void AddTaskLoader(this IServiceCollection services)
        {
            services.AddSingleton<TaskLoader>();
        }

        public static void AddTasks(this IServiceCollection services)
        {
            services.AddSingleton<GroupUserInfoTasks>();
            services.AddSingleton<BackPropagationDeepTasks>();
        }
    }

    public class TaskLoader
    {
        public TaskLoader(IServiceProvider provider, ITaskManager _tm)
        {
            provider.GetService(typeof(GroupUserInfoTasks));
            provider.GetService(typeof(BackPropagationDeepTasks));
        }
    }
}
